package com.xyzq.hs;

public class TSException extends RuntimeException {

	private static final long serialVersionUID = -707092437758852591L;

	private short code;

	private String message;

	public TSException(String message) {
		super(message);
		this.code=-1;
		this.message = message;
	}

	public TSException(short code, String message) {
		super("[ERROR:" + code + "]" + message);
		this.code = code;
		this.message = message;
	}



	public TSException(Throwable cause) {
		super(cause);
	}


	public short getCode() {
		return code;
	}

	public void setCode(short code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return "TSException [code=" + code + ", message=" + message + "]";
	}
	
	

}
